package com.guigu.userservice.feign;

import com.guigu.common.utils.R;
import com.guigu.userservice.dto.Order;
import com.guigu.userservice.dto.PurchaseDemand;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "service-deal")
public interface MyOrderFeign {

    @GetMapping("/dealservice/order/queryOrderByEquipmentId3/{equipmentId}")
    Order queryOrderByEquipmentId3(@PathVariable("equipmentId") Long equipmentId);

    @GetMapping("/dealservice/purchaseDemand/selectPurchaseByEId/{bid}")
    PurchaseDemand selectPurchaseByEId(@PathVariable("bid") Integer bid);

    @GetMapping("/dealservice/order/queryAllOrderByInspectionStatusOne/{id}")
    List<Order>  selectAllOrderByInspectionStatusOne(@PathVariable("id") Integer id);
    // 与 Controller 接口定义保持一致
    @GetMapping("/dealservice/order/getOrderByEqIdAndInspection/{Eid}")
    Order getOrderByEqIdAndInspection(
            @PathVariable("Eid") Long Eid,
            @RequestParam(value = "inspection", required = false) Integer inspection
    );
}






